import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/yb_chinese_text/yb_chinese_text.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBNetWorkModule/YBAPi/YBAPi.dart';



class YBWorkTaiGongGaoListDetailPage extends StatefulWidget {

  final int id;

  const YBWorkTaiGongGaoListDetailPage({Key key, this.id}) : super(key: key);

  @override
  _YBWorkTaiGongGaoListDetailPageState createState() => _YBWorkTaiGongGaoListDetailPageState(id: id);
}

class _YBWorkTaiGongGaoListDetailPageState extends State<YBWorkTaiGongGaoListDetailPage> {

  final int id;

  _YBWorkTaiGongGaoListDetailPageState({this.id});


  @override
  void dispose() {
    // TODO: implement dispose
    EasyLoading.dismiss();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        appBar: AppBar(
          elevation: 0,
          title: Container(
            child: Text(YBChineseText.findWenZhangDetailTitle,style:YBTextStyle.TextStyle30313320Medium,),
          ),
        ),
        body: WebView(
          initialUrl: '${YBApi.Base_QuanCeng_URL}/$id?type=0&codes=benlaitongji',
          onPageFinished: (url){
            EasyLoading.dismiss();
          },
          onPageStarted: (url){
            EasyLoading.show(status: "读取中...");
          },
          javascriptMode: JavascriptMode.unrestricted,
        ),
      ),
    );
  }
}

